import { httpUrl, options } from 'api/config'
import { ajaxPost } from 'api/axios'

export const getList = (page = 1, searchValue = {}) => {
  const url = `${httpUrl}/admin_sys/user/list`

  const data = {
    page: page,
    pageSize: 10,
    ...searchValue
  }

  return ajaxPost(url, data, options())
}

export const actionList = (key = 'save', data = {}) => {
  const url = `${httpUrl}/admin_sys/user/${key}`

  return ajaxPost(url, data, options())
}
